package com.fei.cloudeurekaconsumer.controller;

import com.fei.cloudserviceinterface.domain.User;
import com.fei.cloudserviceinterface.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/getUserById/{userId}")
    public User getUserById(@PathVariable("userId") Integer userId){
        User user = this.userService.getUserById(userId);
        return user;
    }

}
